//
//  YangLog.swift
//  YangFoundation
//
//  Created by yuyang on 2022/6/15.
//

import UIKit

/// YangLog - only works on debug env
public func YangLog<T>(_ params: T, file: String = #file, line: Int = #line, fun: String = #function) {
    #if DEBUG

    #elseif ENTERPRISE
        return
    #else
        return
    #endif

    let fileName = (file as NSString).lastPathComponent
    let fmt = DateFormatter()
    fmt.dateFormat = "yyyy-MM-dd HH:mm:ss"
    let time = fmt.string(from: Date())
    print("[YangLog] \(time): \(fileName) \(line) \(fun) | \(params)")
}
